package com.itwxz.forum.domain.vo;

import cn.dev33.satoken.stp.StpUtil;
import com.itwxz.common.utils.ServletUtils;
import com.itwxz.common.utils.ip.AddressUtils;
import com.itwxz.common.utils.ip.IpUtils;
import com.itwxz.forum.domain.po.ForumUser;
import eu.bitwalker.useragentutils.UserAgent;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;


@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ForumUserInfoVo implements Serializable {
	@Serial
	private static final long serialVersionUID = 1L;

	private ForumUser user;
	/**
	 * 用户唯一标识
	 */
	private String token;

	/**
	 * 登录时间
	 */
	private Long loginTime;

	/**
	 * 登录IP地址
	 */
	private String ipaddr;

	/**
	 * 登录地点
	 */
	private String loginLocation;

	/**
	 * 浏览器类型
	 */
	private String browser;

	/**
	 * 操作系统
	 */
	private String os;

	public Long getUserId() {
		return user.getUserId();
	}

	public String getUserNickName() {
		return user.getNickName();
	}
}
